<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>修改部门</title>
</head>
<a href="#" th:href="@{/emp/to}">首页</a>
<body>
<!--<tr>
    <th>id</th>
    <th>姓名</th>
    <th>性别</th>
    <th>入职时间</th>
    <th>学历</th>
    <th>职务</th>
    <th>地址</th>
    <th>电话</th>
    <th>紧急联系人</th>
    <th>部门</th>
    <th>删除</th>
    <th>修改</th>
</tr>--><!--id  name sex  ctime   xl  zid  address  phone  jphone  did-->
<form th:action="@{/emp/upemp}" method="post">
    <input type="hidden" name="id" th:value="${emp.id}"/><br/>
    姓名：<input type="text" name="name" th:value="${emp.name}"/><br/>
    性别：<input type="radio" name="sex" value="男" th:field="${emp.sex}"/>男
    <input type="radio" name="sex" value="女" th:field="${emp.sex}"/>女<br/>
    <!--<td th:text="${#dates.format(emp.ctime,'yyyy-MM-dd')}"></td>-->
    入职时间：<input type="date" name="ctime" th:value="${#dates.format(emp.ctime,'yyyy-MM-dd')}"/><br/>
    学历：<input type="text" name="xl" th:value="${emp.xl}"/><br/>
    职务:<select name="zid">
    <option value="--请选择--"></option>
    <option th:selected="${emp.zid eq z.id}" th:each="z:${zhi}" th:value="${z.id}" th:text="${z.zname}"></option>
</select>
    <!--<input th:each="z : ${zhi}"  th:value="${emp.zid==z.id}?${z.zname}">-->
    地址：<input type="text" name="address" th:value="${emp.address}"/><br/>
    电话：<input type="text" name="phone" th:value="${emp.phone}"/><br/>
    紧急联系人：<input type="text" name="jphone" th:value="${emp.jphone}"/><br/>
    部门:<select name="did">
    <option value="--请选择--"></option>
    <option th:selected="${emp.did eq d.id}" th:each="d:${dept}" th:value="${d.id}" th:text="${d.dname}"></option>
</select>
    <input type="submit" value="修改"/><br/>
</form>
</body>
</html>